package com.meilai.project.service.system.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.meilai.project.entity.system.Accounting;
import com.meilai.project.mapper.system.AccountingMapper;
import com.meilai.project.service.system.AccountingService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class AccountingServiceImpl extends ServiceImpl<AccountingMapper, Accounting> implements AccountingService {

    @Autowired
    AccountingMapper accountingMapper;

    public void insert(Accounting accounting){
        accountingMapper.setActiveFalse(accounting.getUser_id(),accounting.getDepartment_id());
        save(accounting);
    }
}
